<?php
declare (strict_types = 1);

namespace app\index\controller;
use app\BaseController;
use think\facade\Event;
use adminmatrix\swoole\Websocket;
use adminmatrix\WebSocket\Frame;
use adminmatrix\admin\service\EnvService;
use adminmatrix\admin\service\JsonService;
use think\Request;
use adminmatrix\admin\annotation\Loggable;
use adminmatrix\admin\annotation\Validate;
use adminmatrix\admin\request\LoggableRequest;

class IndexController extends BaseController
{
    #[Loggable(enabled: true)]
    public function index(JsonService $jsonService)
    {
        
        return  $jsonService->handle(function(
            Request $request , 
            \app\adminapi\model\Admin\Admin $admin
            ) {
            return ['name' => 'adminmatrix' , 'asd' => $admin->find(1)];
        });
    }
}
